package com.itheima.tcp3;

import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import java.util.Scanner;

/**
 * @author Anomaly
 * @date 2023/2/11 15:51
 */
public class Client1 {
    public static void main(String[] args) throws IOException {
        System.out.println("==============客户端启动=================");
        Socket socket = new Socket("127.0.0.1", 7777);
        PrintStream ps = new PrintStream(socket.getOutputStream());
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.println("请输入：");
            ps.println(scanner.nextLine());
            ps.flush();
        }
    }
}
